//
//  YXHomeMenuView.m
//  CreditCard
//
//  Created by 杨旭 on 2017/12/21.
//  Copyright © 2017年 杨旭. All rights reserved.
//

#import "YXHomeMenuView.h"

@interface YXHomeMenuView ()

@property (strong, nonatomic) IBOutlet UIView *backView;


@end

@implementation YXHomeMenuView

-(instancetype)initWithFrame:(CGRect)frame withDataArray:(NSArray *)dataArray{
    
    if (self = [super initWithFrame:frame]) {
        // 从xib中找到我们定义的view
        NSArray *viewArray = [[NSBundle mainBundle]loadNibNamed:@"YXHomeMenuView" owner:self options:nil];
        self = viewArray[0];
        self.frame = frame;
        self.backgroundColor = color_backColor;
        [self setupUI];
    }
    return self;
    
}

- (void)setupUI {
    
    self.backView.layer.masksToBounds = YES;
    self.backView.layer.cornerRadius = 8.0f;
}

- (IBAction)btnAction:(UIButton *)sender {
    if (self.selectBtnClickBlock) {
        self.selectBtnClickBlock(sender.tag - 400);
    }
}




@end
